import { Component, OnInit } from '@angular/core';

@Component({
    selector: 'app-study01',
    templateUrl: './study01.component.html',
    styleUrls: ['./study01.component.less']
})
export class Study01Component implements OnInit {
    msg:string="大师兄";
    num=123;
    arr=[1,2,3,4];
    user={
        name:"明凯",
        age:27
    };
    agr1=null;
    arg2=undefined;
    math=Math;
    info:string="加油";
    showMsg(){
        console.log("showMsg方法");
    }
    showInfo(){
        console.log("showInfo方法");
    }
    deliveryIt(a,b){
        console.log(a,b);
        console.log(this);//this指的是当前组件的实例
        console.log("this:",this.num,this.info);
    }
    deliveryThis(e){
        console.log(e);//传入来的this也是指的当前组件实例，与vue不一样
    }
    deliveryEvent(e){
        console.log(e);
    }
    stopDelivery(e){
        // e.stopPropagation();
        e.preventDefault();
    }
    constructor() { }

    ngOnInit() {
    }

}
